package org.hdax.dm.request;

public class QueryItemListRequest {
    private Integer itemTypeId1;
    private Integer itemTypeId2;
    private Integer areaId;
    private String startTime;
    private String endTime;
    //推荐 recommend
    //最近演出 recentShow
    //最新上架 recentSell
    private String sort;
    private String keyword;
    private Integer currentPage = 0;
    private Integer pageSize = 10;
    private Integer pageCount;
    private Integer total;

    public Integer getItemTypeId1() {
        return itemTypeId1;
    }

    public void setItemTypeId1(Integer itemTypeId1) {
        this.itemTypeId1 = itemTypeId1;
    }

    public Integer getItemTypeId2() {
        return itemTypeId2;
    }

    public void setItemTypeId2(Integer itemTypeId2) {
        this.itemTypeId2 = itemTypeId2;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        if (currentPage > 0) {
            this.currentPage = currentPage - 1;
        } else {
            this.currentPage = 0;
        }
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
        this.pageCount = this.total % this.pageSize == 0 ? this.total / this.pageSize : this.total / this.pageSize + 1;
    }
}
